package cn.edu.ccibe.exam16system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.edu.ccibe.exam16system.entity.Student;
import cn.edu.ccibe.exam16system.service.StudentService;
import cn.edu.ccibe.exam16system.mapper.StudentMapper;
import org.springframework.stereotype.Service;

/**
 * @author 19370_d9m1awp
 * @description 针对表【t_student】的数据库操作Service实现
 * @createDate 2025-04-18 08:58:10
 */
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student>
        implements StudentService {

    @Override
    public String login(String username, String password) {
        QueryWrapper<Student> wrapper = new QueryWrapper<>();
        wrapper.eq("username",username);
        wrapper.eq("password",password);
        return getOne(wrapper).getName();
    }
}
